<template>
    <div class="contact">
        <div class="contact-a">
            <!-- <img width="100%" src="../../assets/image/home/banner.png" alt="" /> -->
            <div class="text">
                <div class="we">联系我们</div>
                <div class="us">C O N T A C T U S</div>
                <div class="phone">请致电 ：17674618290</div>
            </div>
        </div>
        <div class="chang">
            <div class="sha">
                <div class="yue">
                    <!--第一个图片 -->
                    <img style="width: 40px" src="../../assets/image/contact/地址.png" alt="" />
                    <div class="tianxiang">长沙岳麓去天祥水晶湾西座2--59</div>
                </div>
                <div class="lian-x">
                    <!-- 第二个 -->
                    <img width="20px" src="../../assets/image/contact/群蜂电话.png" alt="" />
                    联系电话：17674618290
                </div>
                <!-- 第三个 -->
                <div>
                    <img width="20px" src="../../assets/image/contact/群蜂邮箱图标.png" alt="" />
                    电子邮箱：2857247401@qq.com
                </div>
            </div>
        </div>
        <div class="club bx">
            <div class="electrioc">加入我们的团队</div>
            <div class="took">
                <!-- 第一张 -->
                <div class="took-item" v-for="item in join" :key="item.id">
                    <img :src="$staticPath + item.productImageAddress" alt="" />

                    <div class="title">{{ item.productShortTitle }}</div>

                    <div class="content" v-html="item.productDescribe"></div>
                    <div class="content-desc" v-html="item.desc"></div>

                    <img src="../../assets/image/contact/10939.png" class="btn">
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'Contact',
    data() {
        return {
            join: []
        }
    },
    created() {
        this.queryProgram()
    },
    methods: {
        //查询加入团队数据
        queryProgram() {
            this.request('queryProgram', {}, {
                pageNo: 1,
                pageSize: 1000,
                classificationId: '1828262025257275394'
            }).then(res => {
                this.join = res
                console.log(this.join);

                this.queryProgramDesc()
            })
        },

        //查询加入团队数据(交互介绍)
        queryProgramDesc() {
            this.request('queryProgram', {}, {
                pageNo: 1,
                pageSize: 1000,
                classificationId: '1828263998387900418'
            }).then(res => {
                //合并数据
                res.forEach((item, index) => {
                    this.$set(this.join[index], 'desc', item.productDescribe)
                })
            })
        },
    }
};
</script>

<style lang="scss" scoped>
.contact {
    width: 100%;
    background: #f6f6f6;

    .contact-a {
        position: relative;

        .text {
            position: absolute;
            left: 10%;
            bottom: 20px;
            color: #fff;

            .we {
                font-size: 45px;
                letter-spacing: 20px;
            }

            .us {
                font-size: 25px;
            }

            .phone {
                font-size: 40px;
                display: flex;
                margin-left: 50px;
                margin-top: 40px;
            }
        }
    }

    .chang {
        width: 70%;
        height: 200px;
        background-color: #ffffff;
        display: flex;
        margin: 0 auto;
        margin-top: 50px;
        padding-left: 70px;

        &>div>div {
            display: flex;
            // 侧轴剧中
            align-items: center;

            img {
                margin-right: 10px;
            }
        }

        .yue {
            font-size: 18px;
            padding: 30px 0;

            .tianxiang {
                border-bottom: 3px solid #f6f6f6;
                font-size: 20px;
            }
        }

        .lian-x {
            width: 300px;
            padding-bottom: 10px;
        }
    }

    .club {
        position: relative;

        .electrioc {
            text-align: center;
            font-size: 20px;
            margin: 60px;
            color: #343636;
            font-weight: 900;
        }

        .took {
            justify-content: center;
            display: flex;
            padding-bottom: 40px;

            .took-item {
                width: calc(25% - 5px);
                background: #fff;
                display: flex;
                flex-direction: column;
                align-items: center;
                color: #8c8c94;
                font-size: 12px;
                flex-shrink: 0;
                position: relative;
                overflow: hidden;
                margin: calc(20px / 3);
                box-sizing: border-box;
                padding: 20px;
                cursor: pointer;
                transition: background-color .5s;
                height: 500px;

                &:hover{
                    background: #FB6A19;
                }

                &:hover img,
                &:hover .title,
                &:hover .content{
                    display: none
                }

                &:hover .content-desc{
                    display: block
                }

                &:nth-child(4n) {
                    margin-right: 0;
                }

                .title {
                    font-size: 20px;
                    margin: 20px 0;
                }

                .content-desc{
                    display: none;
                    color: white;
                }

                &>div {
                    margin-bottom: 20px;

                    &>div {
                        padding-top: 10px;
                    }
                }

                img {
                    width: 50px;
                    height: 50px;
                    margin-top: 25px;
                }

                .btn {
                    margin-top: auto;
                    cursor: pointer;
                }
            }
        }
    }
}
</style>